@extends('layout')
@section('content')
<body>   
        <h1>Sistema de Ganadería</h1>
        <nav class="navbar navbar-default" role="navigation">
                <div class="container-fluid">
                        <div class="navbar-header">
                                <a class="navbar-brand" href="/">SYSGANADO</a>
                        </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                                <li><a href="/insumos">Todos</a></li>
                                <li class="active"><a href="/insumos/create">Nuevo</a></li>
                        </ul> 
                </div>
        </div> 
     </nav>
        <div class="panel panel-info">
                <div class="panel-heading">
                        <h4>Nuevo Insumo</h4>
                </div>
            <table  class ="table">
                {{ Form::open(array('url' => 'insumos')) }}
                <tr>
                    <th>Nombre: </th>
                    <td>{{Form::text('nombre',Input::old('nombre'), $attributes = array('class'=>'form-control','placeholder'=>"Nombre",'required value'=>""))}}</td>

                </tr>
                <tr class= "info">
                    <th>Codigo Insumo: </th>
                    <td>{{Form::text('cod_insumo',Input::old('cod_insumo'), $attributes = array('class'=>'form-control','placeholder'=>"Codigo Insumo",'required value'=>""))}}</td>                   
                </tr>
                  <tr>
                <th>Tipo de Insumo: </th>
                <td>{{Form::select('id_tipo_insumo',array('0' => 'Seleccione')+TiposInsumos::lists('tipo','id'),null,array('class' => 'form-control','required'))}}</td>
                    
                  </tr>
                  <tr class="info">
                   <th>Descripcion: </th>
                    <td>{{Form::textArea('descripcion',Input::old('descripcion'), $attributes = array('class'=>'form-control','placeholder'=>"Descripcion",'required value'=>""))}}</td>    
                  </tr>                
                <tr>
                <th>Unidad: </th>
                <td>{{Form::select('id_unidad',array('0' => 'Seleccione')+Unidades::lists('unidad','id'),null,array('class' => 'form-control','required'))}}</td>
            </tr>
        </table>
    </div>
<ul class="pagination">
  <li><a href="{{route('insumos.index')}}">Volver</a></li>
  <button class="btn btn-primary">Guardar</button>
</ul>
  @if(Session::has('message'))
                <div class="alert alert-{{ Session::get('class') }}">{{ Session::get('message')}}</div>
        @endif
</body>   
@stop
@section ('modal')
@stop
 </html>
 